package com.supercube.sport.yoga.dao;

import com.supercube.sport.yoga.domain.MemberCardBindingInfoDTO;
import com.supercube.sport.yoga.domain.MemberCardInfoDTO;
import com.supercube.sport.yoga.vo.BindCardBo;
import com.supercube.sport.yoga.vo.BindCardVo;
import com.supercube.sport.yoga.vo.MemberCardBindingInfoVO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface MemberCardBindingInfoMapper {
    int deleteByPrimaryKey(String id);

    int insert(MemberCardBindingInfoDTO record);

    int insertSelective(MemberCardBindingInfoDTO record);

    MemberCardBindingInfoDTO selectByPrimaryKey(String id);

    MemberCardBindingInfoDTO selectByCardIdAndMemberId(String cardId,String memberId);

    int updateByPrimaryKeySelective(MemberCardBindingInfoDTO record);

    int updateByPrimaryKey(MemberCardBindingInfoDTO record);

    /**
     * 根据会员卡id查询开卡会员信息
     *
     * @param cardId
     * @return
     */
    List<MemberCardBindingInfoDTO> selectMemberCardBindingListByCardId(String cardId);

    /**
     * 查询会员绑卡信息列表
     *
     * @param map
     * @return
     */
    List<MemberCardBindingInfoVO> selectMemberBindCardInfoList(Map<String, Object> map);

    List<BindCardVo> queryBindCardList(BindCardBo bo);

    int clearPresent();

    int decreaseDay();

    int stopCardBind();

    int startCardBind();

    int saleAmountTask();

    MemberCardInfoDTO getMemberCardInfo(String memberId, String  cardId);
}